<template>
    <view class="business-list" @click.stop="handleDetails(detail)">
        <!-- <image :src="detail.imgurls" mode="aspectFill"></image> -->
        <cover-image class="img" :src="detail.imgurls"></cover-image>
        <view class="business_title">
            <p>{{ detail.name }}</p>
            <text class="line1">{{ detail.category }}</text>
        </view>
        <view class="business_desc line1">
            {{ detail.introduce }}
        </view>
        <view class="business_icon" style="flex: 1">
            <image src="@/static/home/map.png" mode=""></image>
            <text class="line1">{{ detail.address }}</text>
        </view>
        <view class="business_icon">
            <image src="@/static/home/phone.png" mode=""></image>
            <text>{{ detail.phone }}</text>
        </view>
    </view>
</template>

<script>
const app = getApp();
export default {
    name: "business-list",
    props: {
        detail: Object,
    },
    data() {
        return {};
    },
    methods: {
        handleDetails(detail) {
            uni.navigateTo({
                url: "/pages/index/business/details?shopid=" + detail.shopid,
            });
        },
    },
};
</script>

<style lang="scss" scoped>
.business-list {
    margin-top: 48rpx;

    .img {
        width: 100%;
        height: 402rpx;
        border-radius: 16rpx;
        background: #eeeeee;
    }

    .business_title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 16rpx;

        p {
            font-family: Manrope, Manrope;
            font-weight: bold;
            font-size: 36rpx;
            color: #1c120d;
        }

        text {
            display: inline-block;
            width: 84rpx;
            height: 46rpx;
            background: #f7ede6;
            border-radius: 8rpx;
            font-size: 26rpx;
            line-height: 46rpx;
            color: #9e6b47;
            text-align: center;
        }
    }

    .business_desc {
        font-family: Manrope, Manrope;
        font-weight: 400;
        font-size: 30rpx;
        color: #666666;
        padding-top: 2rpx;
    }

    .business_icon {
        display: flex;
        align-items: center;
        margin-top: 10rpx;

        image {
            width: 28rpx;
            height: 28rpx;
            margin-right: 10rpx;
        }

        text {
            font-family: Manrope, Manrope;
            font-weight: 400;
            font-size: 30rpx;
            color: #444444;
            display: inline-block;
            max-width: 92%;
        }
    }
}
</style>
